package com.wink.common;

import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "identity")
@XmlAccessorType(XmlAccessType.FIELD)
public class Identity {

	@XmlElement(name = "fromCommunity")
	private String fromCommunity;	

	@XmlElement(name = "fromUser")
	private String fromUser;
	
	@XmlElement(name = "date")
	private Date date;		
	
	public String getFromCommunity() {
		return fromCommunity;
	}

	public void setFromCommunity(String fromCommunity) {
		this.fromCommunity = fromCommunity;
	}
	
	public String getFromUser() {
		return fromUser;
	}

	public void setFromUser(String fromUser) {
		this.fromUser = fromUser;
	}
	
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
	public String toString() {
		StringBuffer sf = new StringBuffer();
		
		sf.append("<fromCommunity> " + fromCommunity);
		sf.append("<fromUser> " + fromUser);
		sf.append("<date> " + date.toLocaleString());		
		
		return sf.toString();
	}
	
}
